package cn.stronglink.netrequest.business.search;

import java.util.List;

import cn.stronglink.netrequest.util.HttpURL;
import cn.stronglink.netrequest.util.HttpUtil;
import okhttp3.Call;
import okhttp3.Callback;

/**
 * Created by Tgb on 2018/6/15.
 * 资产查找
 */

public class SearchService {

    public void downloadAssetData(Callback callback) throws Exception {
        HttpUtil.httpPost(HttpURL.URL_ASSET_DATA, callback);
    }

    public void updateAssetData(String json, Callback callback) throws Exception {
        HttpUtil.httpPost(HttpURL.URL_UPDATE_ASSET_DATA, json, callback);
    }

    public String downloadAssetData() throws Exception {
        return HttpUtil.httpPostAnync(HttpURL.URL_ASSET_DATA);
    }

    public String updateAssetData(String json) throws Exception {
        return HttpUtil.httpPostAsync(HttpURL.URL_UPDATE_ASSET_DATA, json);
    }

    public void queryAssetListOnline(String json, Callback callback) throws Exception {
        HttpUtil.httpPost(HttpURL.URL_QUERY_ASSET_LIST_ONLINE,json,callback);
    }
}
